@extends('admin.public.father')

@section('content')
    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="{{route('user.index')}}">用户列表</a></li>
        <li><a href="{{route('user.create')}}">添加用户</a></li>
    </ul>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">用户列表</h3>
        </div>
        <div class="panel-body">
            <table class="table table-striped table-hover">
                                  <thead>
                    <tr>
                        <th>账号</th>
                        <th>邮箱</th>
                        <th>密码</th>
                        <th width="150">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($sliders as $v)
                        <tr>
                            <td scope="row">{{$v['name']}}</td>
                            <td>
                            {{$v["email"]}}
                            <td>
                                {{$v["password"]}}}
                            </td>
                            <td>
                                <div class="btn-group" role="group" aria-label="Basic example">
                                    <a href="{{route("user.edit",$v)}}" class="btn btn-info">编辑</a>
                                    <form action="{{route("user.destroy",$v)}}" method="post">
                                        @csrf
                                        @method("DELETE")
                                        <button class="btn btn-danger">删除</button>
                                    </form>
                                </div>
                            </td>
                        </tr>
                    @endforeach

                    </tbody>
            </table>
            {{$sliders->links()}}
        </div>
    </div>
@endsection
